import ReactDOM from "react-dom/client";
import App from "./App";
import store from "./redux/store";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);

/**
 * 监测 redux 中状态的改变，如果 redux 中的状态发生了改变，那么重新渲染 App 组件
 */
store.subscribe(() => {
    root.render(<App />);
});
